More redis config for heroku

jamesperet 9 years ago
parent
commit
2c37bea456
2 changed files with 5 additions and 2 deletions
  1. 2 0
      Gemfile
  2. 3 2
      config/initializers/redis.rb

+ 2 - 0
Gemfile

@@ -1,5 +1,7 @@
1 1
 source 'https://rubygems.org'
2 2
 
3
+ruby '2.0.0'
4
+
3 5
 # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
4 6
 gem 'rails', '4.0.4'
5 7
 

+ 3 - 2
config/initializers/redis.rb

@@ -1,2 +1,3 @@
1
-uri = URI.parse(ENV["REDISTOGO_URL"])
2
-REDIS = Redis.new(:url => ENV['REDISTOGO_URL'])
1
+uri = URI.parse(ENV["REDISTOGO_URL"] || "redis://localhost:6379/" )
2
+REDIS = Redis.new(:url => ENV['REDISTOGO_URL'])
3
+Resque.redis = REDIS